package com.kude.manager;

import com.kude.dao.ArticleCategoryPrefixDAO;
import com.kude.entity.ArticleCategoryPrefix;

public class ArticleCategoryPrefixManager extends
		AbstractManager<ArticleCategoryPrefix, ArticleCategoryPrefixDAO> {
	ArticleCategoryPrefixDAO articleCategoryPrefixDAO;

	public ArticleCategoryPrefixManager() {
		this.tableName = ArticleCategoryPrefix.TABLE_NAME;
	}

	public boolean isExist(ArticleCategoryPrefix obj) throws OperException {
		if (obj == null) {
			throw new OperException("产品对象obj不能为空");
		}
		if (obj.getPrefixId() == null) {
			return false;
		}
		if (dao.getById(obj.getPrefixId()) == null) {
			return false;
		}
		return true;
	}

	public void setArticleCategoryPrefixDAO(
			ArticleCategoryPrefixDAO articleCategoryPrefixDAO) {
		this.dao = articleCategoryPrefixDAO;
	}

}
